#pragma once
#include "Binding/BoundExpression.hpp"
#include "Binding/BoundStatement.hpp"
#include "Binding/BoundLabel.hpp"

class BoundConditionalGotoStatement : public BoundStatement
{
public:
    SharedBoundLabel     Lable;
    SharedBoundExpression Condtion;
    bool                  JumpIfTrue;

public:
    BoundConditionalGotoStatement(SharedBoundLabel lable, SharedBoundExpression condtion, bool jumpIfTrue = true)
        : BoundStatement(BoundNodeKind::ConditionalGotoStatement), Lable(lable), Condtion(condtion), JumpIfTrue(jumpIfTrue)
    {
    }

public:
    virtual std::vector<std::tuple<std::string, std::string>> GetProperties() override
    {
        return {{"Name", this->Lable->Name}, {"JumpIfTrue", JumpIfTrue ? "True" : "False"}};
    }
    virtual std::vector<SharedBoundNode> GetChildren() override { return {this->Condtion}; }
};
